package com.ly.heart.service;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ly.common.core.domain.AjaxResult;
import com.ly.heart.domain.KingProcureRefundEntity;
import com.ly.heart.domain.KingProcureRefundMaterialEntity;
import com.ly.heart.domain.dto.KingProcureRefundQueryDto;
import com.ly.heart.domain.vo.select.query.KingProcureRefundSelectQueryDto;

/**
 * 金蝶-采购退料单Service接口
 *
 * @author cxl
 * @date 2024-07-16
 */
public interface IKingProcureRefundService extends IService<KingProcureRefundEntity> {

    /**
     * 采购退料单列表，以物料为主
     * @return
     */
    AjaxResult getKingProcureRefundPageListByMaterial(KingProcureRefundQueryDto queryDto);

    /**
     * 暂存采购退料单
     * @param kingProcureRefund
     * @return
     */
    AjaxResult draft(KingProcureRefundEntity kingProcureRefund);

    /**
     * 提交采购退料单
     * @param kingProcureRefund
     * @return
     */
    AjaxResult submit(KingProcureRefundEntity kingProcureRefund);

    /**
     * 修改采购退料单
     * @param kingProcureRefund
     * @return
     */
    AjaxResult update(KingProcureRefundEntity kingProcureRefund);

    /**
     * 采购退料单审核完毕后调用此方法更新即时库存
     * @param procureRefundMaterialLists 采购退料单物料明细
     */
    public void updateRealTimeInventory(List<KingProcureRefundMaterialEntity> procureRefundMaterialLists);

    /**
     * 查询金蝶-采购退料单
     *
     * @param id 金蝶-采购退料单ID
     * @return 金蝶-采购退料单
     */
    public KingProcureRefundEntity selectKingProcureRefundEntityById(String id);

    /**
     * 查询金蝶-采购退料单列表
     *
     * @param kingProcureRefundEntity 金蝶-采购退料单
     * @return 金蝶-采购退料单集合
     */
    public List<KingProcureRefundEntity> selectKingProcureRefundEntityList(KingProcureRefundEntity kingProcureRefundEntity);

    /**
     * 新增金蝶-采购退料单
     *
     * @param kingProcureRefundEntity 金蝶-采购退料单
     * @return 结果
     */
    public int insertKingProcureRefundEntity(KingProcureRefundEntity kingProcureRefundEntity);

    /**
     * 修改金蝶-采购退料单
     *
     * @param kingProcureRefundEntity 金蝶-采购退料单
     * @return 结果
     */
    public int updateKingProcureRefundEntity(KingProcureRefundEntity kingProcureRefundEntity);

    /**
     * 批量删除金蝶-采购退料单
     *
     * @param ids 需要删除的金蝶-采购退料单ID
     * @return 结果
     */
    public int deleteKingProcureRefundEntityByIds(String[] ids);

    /**
     * 删除金蝶-采购退料单信息
     *
     * @param id 金蝶-采购退料单ID
     * @return 结果
     */
    public int deleteKingProcureRefundEntityById(String id);

    /**
     * 采购退料单选单接口
     * @param queryDto
     * @return
     */
    AjaxResult getKingProcureRefundSelect(KingProcureRefundSelectQueryDto queryDto);
}
